package com.softa.vo;

import com.github.pagehelper.PageInfo;

/**
 * Created by yangl on 2017/8/13.
 */
public class PaginationResponse {

    //总页数
    private long totalData;

    //每页显示的个数
    private int showData;

    private Iterable<?> rows;

    public PaginationResponse(long totalData, int showData) {
        this.totalData = totalData;
        this.showData = showData;
    }

    public PaginationResponse(PageInfo<?> pageInfo, int showData) {
        this.totalData = pageInfo.getTotal();
        this.showData = showData;
        this.rows = pageInfo.getList();
    }

    public Iterable<?> getRows() {
        return rows;
    }

    public void setRows(Iterable<?> rows) {
        this.rows = rows;
    }

    public long getTotalData() {
        return totalData;
    }

    public void setTotalData(long totalData) {
        this.totalData = totalData;
    }

    public int getShowData() {
        return showData;
    }

    public void setShowData(int showData) {
        this.showData = showData;
    }
}
